/* 提高选择器优先级并覆盖基础样式 */
html body {
    margin: 0 !important;
    padding: 80px 0 0 0 !important;
    padding-left: 0% !important;
    padding-right: 0% !important;

    width: 100% !important;
    height: auto !important;
    background: url('/static/bunnyspell.png') no-repeat 10% 80% fixed !important;
    background-size: 20% auto !important;
    background-color: #141E30 !important;
    display: block !important;  /* 覆盖 flex */
    overflow-y: auto !important;
    min-height: 100vh !important;
}

/* 添加背景遮罩 */
body.lb_page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(20, 30, 48, 0.9), rgba(36, 59, 85, 0.9));
    z-index: 0;
}

/* 调整容器布局 */
.lb_container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

.lb_title {
    text-align: center;
    font-size: 2.5rem;
    margin: 2rem 0;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.lb_trophy-icon {
    margin-right: 0.75rem;
    font-size: 2.75rem;
    vertical-align: middle;
    color: #ffcc00;
}

.lb_wrapper {
    background: linear-gradient(145deg, rgba(36, 59, 85, 0.8), rgba(26, 42, 61, 0.8));
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

/* Table Styles */
.lb_table {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* 防止内容溢出 */
}

.lb_header {
    display: grid;
    grid-template-columns: 100px minmax(200px, 2fr) 1fr 1fr 1fr 1fr;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(90deg, #141E30, #243B55);
    color: #ffcc00;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.lb_body {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0; /* 防止内容溢出 */
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #1a2a3d;
}

.lb_body::-webkit-scrollbar {
    width: 8px;
}

.lb_body::-webkit-scrollbar-track {
    background: #1a2a3d;
}

.lb_body::-webkit-scrollbar-thumb {
    background: #ffcc00;
    border-radius: 4px;
}

.lb_row {
    display: grid;
    grid-template-columns: 100px minmax(200px, 2fr) 1fr 1fr 1fr 1fr;
    padding: 1rem 1.5rem;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    color: #ffffff;
}

.lb_row:hover {
    background: linear-gradient(90deg, rgba(255,204,0,0.1), transparent);
    transform: translateX(5px);
}

.lb_first {
    background: linear-gradient(90deg, rgba(255,204,0,0.15), rgba(255,204,0,0.05));
}


.lb_avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffcc00, #ffd700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #141E30;
    box-shadow: 0 2px 8px rgba(255,204,0,0.3);
}

.lb_username, .lb_games, .lb_avg {
    color: #ffffff;
    font-size: 1.1rem;
}

.lb_score {
    color: #ffcc00;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Pagination Styles */
.lb_pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, transparent, rgba(20,30,48,0.5));
}

.lb_page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.lb_page-link:hover {
    background: rgba(255,204,0,0.2);
    transform: translateY(-2px);
}

.lb_page-link.active {
    background: #ffcc00;
    color: #141E30;
    box-shadow: 0 4px 12px rgba(255,204,0,0.3);
}

.lb_dots {
    color: rgba(255,255,255,0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lb_container {
        padding: 0 1rem;
        margin-top: 1rem;
    }
    
    .lb_title {
        font-size: 2rem;
        margin: 1rem 0;
    }
    
    .lb_wrapper {
        border-radius: 15px;
    }
    
    .lb_header, .lb_row {
        grid-template-columns: 80px 2fr 1fr 1fr;
        padding: 1rem;
    }
    
    .lb_games, .lb_avg {
        display: none;
    }
}

/* 当前用户高亮样式 */
.lb_row.lb_current-user {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.15), rgba(52, 152, 219, 0.05));
    border-left: 4px solid #3498db;  /* 蓝色边框标记 */
}

.lb_row.lb_current-user:hover {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.2), rgba(52, 152, 219, 0.1));
    transform: translateX(5px);
}

/* 如果是第一名且是当前用户，保持金色主题但加入蓝色边框 */
.lb_row.lb_first.lb_current-user {
    background: linear-gradient(90deg, rgba(255,204,0,0.15), rgba(255,204,0,0.05));
    border-left: 4px solid #3498db;
}

.lb_row.lb_first.lb_current-user:hover {
    background: linear-gradient(90deg, rgba(255,204,0,0.2), rgba(255,204,0,0.1));
}

html body.lb_page {
    margin: 0 !important;
    padding: 80px 0 !important;
    width: 100% !important;
    height: auto !important;
    background: url('/static/bunnyspell.png') no-repeat 15% 85% fixed !important;
    background-size: 25% auto !important;
    background-color: #141E30 !important;
    display: block !important;  /* 覆盖 flex */
    overflow-y: auto !important;
    min-height: 100vh !important;
}
